package com.tywh.controller;

import com.alibaba.fastjson.JSON;
import com.github.pagehelper.PageInfo;
import com.tywh.pojo.CstBill;
import com.tywh.pojo.PageBean;
import com.tywh.pojo.ResponseData;
import com.tywh.service.CtsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;


/**
 * @author xhx
 * @date 2018年4月19日 下午3:20:19
 */
@Controller
public class CtsController {
	
	@Autowired
	private CtsService ctsService;

	@ResponseBody
	@RequestMapping(value = "/getCtsBill" , method=RequestMethod.GET)
	public String getCtsBill(PageBean pageBean){
		ResponseData responseData = ctsService.GetCtsBill(pageBean);
		return JSON.toJSONString(responseData);
	}

	@ResponseBody
	@RequestMapping(value = "/getCtsBillPage" , method=RequestMethod.GET)
	public String getCtsBillPage(PageBean pageBean){
		ResponseData responseData = ctsService.GetCtsBillPage(pageBean);
		return JSON.toJSONString(responseData);
	}

}
